﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BookStore.Data
{
    public class productInfo
    {
        #region var

        private int _productID;
        private int _catogoryID;

        public int CatogoryID
        {
            get { return _catogoryID; }
            set { _catogoryID = value; }
        }
        private string _productName;

        //private string _subCatogoryID;

      

        private int _manufacturerID;
        private float _price;
        private int _quantity;
        private bool _sale;

        private DateTime _date;

        public DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }
        private bool _active;

        public bool Active
        {
            get { return _active; }
            set { _active = value; }
        }

        private string _description;
        private int _authorID;
        private string _image;

        private string _productcode;

        public string Productcode
        {
            get { return _productcode; }
            set { _productcode = value; }
        }
        #endregion

        #region property

        public int productID { get { return _productID; } set { _productID = value; } }
        public string productName { get { return _productName; } set { _productName = value; } }

        //  public String subCatogoryID { get { return _subCatogoryID; } set { _subCatogoryID = value; } }
        public int ManufacturerID
        {
            get { return _manufacturerID; }
            set { _manufacturerID = value; }
        }
        // public float price { get { return _price; } set { _price = value; } }

       
        public int manufacturerID { get { return _manufacturerID; } set { _manufacturerID = value; } }
        public float price { get { return _price; } set { _price = value; } }

        public int quantity { get { return _quantity; } set { _quantity = value; } }
        public bool sale { get { return _sale; } set { _sale = value; } }
        public string description { get { return _description; } set { _description = value; } }
        public int authorID { get { return _authorID; } set { _authorID = value; } }
        public string image { get { return _image; } set { _image = value; } }

        private int number;

        public int Number
        {
            get { return number; }
            set { number = value; }
        }

        public double Total
        {
            get { return Number * price; }

        }
        #endregion
     

        public productInfo()
        {
            number = 1;
        }
        public productInfo(int Id, int CatogoryID, String Name, int manufacturerID, float price, int quantity, bool sale, DateTime date, bool active, String description, int authorID, String images, string productcode)
        {
            this._productID = Id;
            this._catogoryID = CatogoryID;
            this._productName = Name;
           
            this._manufacturerID = manufacturerID;
            this._price = price;
            number = 1;
            this._sale = sale;
            this._date = date;
            this._active = active;
            this._description = description;
            this._authorID = authorID;
            this._image = images;
        }
    }

}
